home *** CD-ROM | disk | FTP | other *** search
/ Freelog 115 / FreelogNo115-MaiJuin2013.iso / Internet / Filezilla Server / FileZilla_Server-0_9_41.exe / source / interface / misc / Led.h < prev    next >
C/C++ Source or Header  |  2011-11-06  |  3KB  |  90 lines

  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Led.h : header file
  3. // Visual Source Safe: $Revision: 1.2 $
  4. //
  5. // Led static control. Will display a LED in 4 different colors and two shapes.
  6. ///////////////////////////////////////////////////////////////////////////////
  7. // Copyright (C) 1998-1999 Monte Variakojis ( monte@apollocom.com )
  8. // All rights reserved - not to be sold.
  9. ///////////////////////////////////////////////////////////////////////////////
  10. #if !defined(AFX_LEDWND_H__2D837381_FFEC_11D1_A1CE_00A024D311C0__INCLUDED_)
  11. #define AFX_LEDWND_H__2D837381_FFEC_11D1_A1CE_00A024D311C0__INCLUDED_
  12.  
  13. #if _MSC_VER >= 1000
  14. #pragma once
  15. #endif // _MSC_VER >= 1000
  16. ///////////////////////////////////////////////////////////////////////////////
  17.  
  18. #define LED_SIZE    16            // Led are 16 X 16 pixels
  19.  
  20. /////////////////////////////////////////////////////////////////////////////
  21. // CLed window
  22. class CLed : public CStatic
  23. {
  24.  
  25. protected:
  26.     int m_nLedColor, m_nLedMode, m_nLedShape;
  27.     DWORD m_dwPingTimeout;
  28.     BOOL m_bPingEnabled;
  29.     CBitmap m_LedBitmap;
  30.     bool m_continuePing;
  31.  
  32. public:
  33.  
  34.     enum {
  35.         LED_ROUND = 0,                        // Circle starts at row 0
  36.         LED_SQUARE = LED_SIZE * 4,            // squares start at row 4
  37.     };
  38.     enum {
  39.         LED_COLOR_RED = 0 * LED_SIZE,        // Row 0
  40.         LED_COLOR_GREEN = 1 * LED_SIZE,        // Row 1
  41.         LED_COLOR_YELLOW = 2 * LED_SIZE,    // Row 2
  42.         LED_COLOR_BLUE = 3 * LED_SIZE,        // Row 3
  43.     };
  44.     enum {
  45.         LED_ON = 0,                            // Column 0
  46.         LED_OFF = 1,                        // Column 1
  47.         LED_DISABLED = 2,                    // Column 2
  48.     };
  49.  
  50. // Construction
  51. public:
  52.     CLed();
  53.  
  54. // Attributes
  55. public:
  56.  
  57. // Operations
  58. public:
  59.     void SetLed(int nLedColor, int nMode, int nShape);
  60.     int GetLedMode(){return m_nLedMode;}
  61.     void Ping(DWORD dwTimeout = 1000);
  62.  
  63. // Overrides
  64.     // ClassWizard generated virtual function overrides
  65.     //{{AFX_VIRTUAL(CLed)
  66.     //}}AFX_VIRTUAL
  67.  
  68. // Implementation
  69. public:
  70.     void DrawLed( CDC *pDC, int nLEDColor, int nMode, int nShape );
  71.     virtual ~CLed();
  72.  
  73.     // Generated message map functions
  74. protected:
  75.     //{{AFX_MSG(CLed)
  76.     afx_msg void OnPaint();
  77.     afx_msg void OnTimer(UINT_PTR nIDEvent);
  78.     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  79.     //}}AFX_MSG
  80.     DECLARE_MESSAGE_MAP()
  81.  
  82. };
  83.  
  84. /////////////////////////////////////////////////////////////////////////////
  85.  
  86. //{{AFX_INSERT_LOCATION}}
  87. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  88.  
  89. #endif // !defined(AFX_LEDWND_H__2D837381_FFEC_11D1_A1CE_00A024D311C0__INCLUDED_)
  90.